package com.ktwlsoft.archivemanage.payload.security;

import com.ktwlsoft.archivemanage.domain.dao.entity.Account;
import com.ktwlsoft.archivemanage.domain.dao.entity.ActionSource;
import com.ktwlsoft.archivemanage.domain.dao.entity.MenuSource;
import com.ktwlsoft.archivemanage.domain.dao.entity.Role;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

@Getter
@Setter
public class JwtAuthenticationResponse {

    private String accessToken;

    private String tokenType = "Bearer";

    private List<ActionSource> userActions;

    private List<MenuSource> userMenus;

    private AccountResponse user;

    public JwtAuthenticationResponse(String accessToken, AccountResponse user) {
        this.accessToken = accessToken;
        this.user = user;
    }

    public JwtAuthenticationResponse(String accessToken, List<ActionSource> userActions, List<MenuSource> userMenus, AccountResponse user) {
        this.accessToken = accessToken;
        this.userActions = userActions;
        this.userMenus = userMenus;
        this.user = user;
    }
}
